package com.px.framework.mqtt.handler;

import org.eclipse.paho.client.mqttv3.MqttMessage;

import java.util.regex.Pattern;

public abstract class IMqttHandler {

    /**
     * MQTT处理类绑定的Topic表达式
     *
     */
    public abstract Pattern bindTopicName();

    /**
     * 接收到Topic消息后的回调
     *
     * @param mqttMessage
     */
    public abstract void handler(String topic, MqttMessage mqttMessage);

}
